/**
 * 
 */

import BaseUI from "../framwork/BaseUI";

const { ccclass, menu, property } = cc._decorator;

@ccclass
export default class Msg extends BaseUI {

	public static prefabUrl = "Prefab/Msg";
	public static className = "Msg";

    baseUI_onLoad(): void {
        
    }

    init_data(d: any): void {
        console.log(d);
        this.setMsg(d.msg);
    }
    
    baseUI_onDestroy(): void {
        
    }

    onBtn_click(target: cc.Button, onBtn_name: string): number | void {
        switch (onBtn_name) {
            case "btn_close":
                this.closeUI();
                break;
            default:
                break;
        }
    }

    
    start () {

    }
	
    setMsg(str: string){
        this.SetLabel("MsgStr",str);
    }
}